@isTest
private class GenCRMexamineHandlerTest {
    static testMethod void testMethod1() {

          TestUtils.createUsers();

        User u = [SELECT Id,Name FROM User WHERE Name = '用户1'];
        
        Account acc = TestUtils.createAccount();
        acc.ownerId = u.Id;
        insert acc;
        Account acc1 = new Account();
        acc1.name ='测试客户1';
        acc1.ownerId = u.Id;
        insert acc1;

      

        // Id ldcProfile = [Select Id From Profile Where Name ='系统管理员' or Name='System Administrator'].Id;

        // User u = new User( Alias = 'samLdc1', 
        //                  Email = 'ldc@test.com.maike',
        //                  Emailencodingkey = 'UTF-8', 
        //                  Lastname = '用户1', 
        //                  Languagelocalekey = 'en_US',
        //                  Localesidkey = 'en_US', 
        //                  Profileid = ldcProfile, 
        //                  Country = 'United States',
        //                  IsActive = true,
        //                  SubCompany__c='四川省迈克实业有限公司',
        //                  UserDepartment__c='客户服务中心(工程部)',
        //                  Timezonesidkey = 'America/Los_Angeles', 
        //                  Username = 'Matldc1@test.com.maike' );
        // insert u;

        System.debug(LoggingLevel.INFO, '*** u.Id: ' + u.Id);
        CRMCheckCustomer__c crmcc = new CRMCheckCustomer__c();
        crmcc.Customer__c = acc.Id;
        crmcc.Q__c='1季度';
        crmcc.Year01__c='2017';
        crmcc.EvaluationPerson__c=u.Id;
        crmcc.OwnerId=Userinfo.getUserId();
        crmcc.BeingJudged__c=u.Id;
        insert crmcc;
        crmcc.Customer__c = acc1.Id;
        update crmcc;
        ///删除crm考核客户 同时删掉考核评分对象
        delete crmcc;
    }
}